'Class: PenData
'Holds all the settings for the pen
Public Class PenData

#Region "Property Variables"
    Private _boundToSize As Boolean
    Private _boundToOuter As Boolean
    Private _boundToPressure As Boolean
    Private _minSize As Integer
    Private _maxSize As Integer
    Private _size As Integer
    Private _minOuter As Integer
    Private _maxOuter As Integer
    Private _outer As Integer
    Private _minPressure As Integer
    Private _maxPressure As Integer
    Private _pressure As Integer
    Private _sensitivity As Single
    Private _operation As Integer
    Private _name As String
    Private _texture As String
    Private _grassTexture As String
    Private _bladeSize As Integer
    Private _bladeVariation As Integer
#End Region

#Region "Properties"
    'Property: Texture
    'Current texture
    Public Property Texture() As String
        Get
            Return _texture
        End Get
        Set(ByVal value As String)
            _texture = value
        End Set
    End Property

    'Property: BladeSize
    'Current size of grass blades
    Public Property BladeSize() As Integer
        Get
            Return _bladeSize
        End Get
        Set(ByVal value As Integer)
            _bladeSize = value
        End Set
    End Property

    'Property: BladeVariation
    'The variation in grass blade size
    Public Property BladeVariation()
        Get
            Return _bladeVariation
        End Get
        Set(ByVal value)
            _bladeVariation = value
        End Set
    End Property

    'Property: GrassTexture
    'Name of the selected grass texture
    Public Property GrassTexture() As String
        Get
            Return _grassTexture
        End Get
        Set(ByVal value As String)
            _grassTexture = value
        End Set
    End Property

    'Property: BoundToSize
    'Holds whether or not the size property is bound to the pen
    Public Property BoundToSize() As Boolean
        Get
            Return _boundToSize
        End Get
        Set(ByVal value As Boolean)
            _boundToSize = value
        End Set
    End Property

    'Property: BoundToOuter
    'Holds whether or not the outer property is bound to the pen
    Public Property BoundToOuter() As Boolean
        Get
            Return _boundToOuter
        End Get
        Set(ByVal value As Boolean)
            _boundToOuter = value
        End Set
    End Property

    'Property: BoundToPressure
    'Holds whether or not the pressure property is bound to the pen.
    'Note that this is the toolset pressure, NOT the tablet pressure.
    Public Property BoundToPressure() As Boolean
        Get
            Return _boundToPressure
        End Get
        Set(ByVal value As Boolean)
            _boundToPressure = value
        End Set
    End Property

    'Property: Sensitivity
    'A scaling factor to reduce the sensitivity of the tablet.  1 is 100% sensitivity.
    'The minimum allowed is 0.25
    Public Property Sensitivity() As Single
        Get
            Return _sensitivity
        End Get
        Set(ByVal value As Single)
            If value < 0.25 Then value = 0.25
            If value > 1.0 Then value = 1.0
            _sensitivity = value
        End Set
    End Property

    'Property: Operation
    'Which operation is this bound to
    Public Property Operation() As Integer
        Get
            Return _operation
        End Get
        Set(ByVal value As Integer)
            _operation = value
        End Set
    End Property


    'Property: MinSize
    'The minimum value size can be.  Can never be lower than 1/greater than 40.
    Public Property MinSize() As Integer
        Get
            Return _minSize
        End Get
        Set(ByVal value As Integer)
            If value < 1 Then value = 1
            If value > 40 Then value = 40
            _minSize = value
        End Set
    End Property

    'Property: MaxSize
    'The maximum value size can be.  Can never be lower than 1/greater than 40.
    Public Property MaxSize() As Integer
        Get
            Return _maxSize
        End Get
        Set(ByVal value As Integer)
            If value < 1 Then value = 1
            If value > 40 Then value = 40
            _maxSize = value
        End Set
    End Property

    'Property: Size
    'Current value of size.  Can never be lower than 1/greater than 40.
    Public Property Size() As Integer
        Get
            Return _size
        End Get
        Set(ByVal value As Integer)
            If value < 1 Then value = 1
            If value > 40 Then value = 40
            _size = value
        End Set
    End Property

    'Property: MinOuter
    'The minimum value outer can be.  Can never be lower than 0/greater than 40.
    Public Property MinOuter() As Integer
        Get
            Return _minOuter
        End Get
        Set(ByVal value As Integer)
            If value < 0 Then value = 0
            If value > 40 Then value = 40
            _minOuter = value
        End Set
    End Property

    'Property: MaxOuter
    'The maximum value outer can be.  Can never be lower than 1/greater than 40.
    Public Property MaxOuter() As Integer
        Get
            Return _maxOuter
        End Get
        Set(ByVal value As Integer)
            If value < 1 Then value = 1
            If value > 40 Then value = 40
            _maxOuter = value
        End Set
    End Property

    'Property: Outer
    'Current value of outer.  Can never be lower than 0/greater than 40.
    Public Property Outer() As Integer
        Get
            Return _outer
        End Get
        Set(ByVal value As Integer)
            If value < 0 Then value = 0
            If value > 40 Then value = 40
            _outer = value
        End Set
    End Property

    'Property: MinPressure
    'The minimum value pressure can be.  Can never be lower than 1/greater than 1000.
    Public Property MinPressure() As Integer
        Get
            Return _minPressure
        End Get
        Set(ByVal value As Integer)
            If value < 1 Then value = 1
            If value > 10000 Then value = 10000
            _minPressure = value
        End Set
    End Property

    'Property: MaxPressure
    'The maximum value pressure can be.  Can never be lower than 1/greater than 1000.
    Public Property MaxPressure() As Integer
        Get
            Return _maxPressure
        End Get
        Set(ByVal value As Integer)
            If value < 1 Then value = 1
            If value > 10000 Then value = 10000
            _maxPressure = value
        End Set
    End Property

    'Property: Name
    'Name of the pen
    Public Property Name() As String
        Get
            Return _name
        End Get
        Set(ByVal value As String)
            _name = value
        End Set
    End Property

    'Property: Pressure
    'Current value of pressure.  Can never be lower than 1/greater than 1000.
    Public Property Pressure() As Integer
        Get
            Return _pressure
        End Get
        Set(ByVal value As Integer)
            If value < 1 Then value = 1
            If value > 10000 Then value = 10000
            _pressure = value
        End Set
    End Property

    'ToString
    Public Shadows ReadOnly Property ToString() As String
        Get
            Return Me._name
        End Get
    End Property
#End Region

    Public Sub New()
        Me.BoundToOuter = False
        Me.BoundToPressure = False
        Me.BoundToSize = False
        Me.MaxOuter = 40
        Me.MaxPressure = 10000
        Me.MaxSize = 40
        Me.MinOuter = 0
        Me.MinPressure = 1
        Me.MinSize = 1
        Me.Size = 8
        Me.Outer = 4
        Me.Pressure = 5000
        Me.Sensitivity = 1.0
        Me.Operation = 0    'raise terrian
        Me.Name = "default"
        Me.Texture = "TT_GD_Dirt_01"
        Me.GrassTexture = "AG_Autumn_Grass_0"
        Me.BladeSize = 5
        Me.BladeVariation = 0.0
    End Sub
End Class
